package controllers

import "github.com/astaxie/beego"

type DocsController struct {
	beego.Controller
}

// @Title TestApi_01
// @Description 测试api方法01
// @Param	key	formData string	true	"The email for login"
// @Success 200 object
// @Failure -1 参数错误
// @router /test_api_01 [post]
func (this *DocsController) TestApi_01() {
	this.Ctx.Output.Header("Access-Control-Allow-Origin", "*")
	key := this.GetString("key")
	this.Data["json"] = key
	this.ServeJson()
}

// @Title TestApi_02
// @Description 测试api方法02
// @Param   secret   formData  string  true     "The secret for password"
// @Success 200 object
// @Failure -1 参数错误
// @router /test_api_02 [post]
func (this *DocsController) TestApi_02() {
	this.Ctx.Output.Header("Access-Control-Allow-Origin", "*")
	secret := this.GetString("secret")
	this.Data["json"] = secret
	this.ServeJson()
}
